﻿CREATE TABLE [flcrTM].[FACILITY] (
    [TM_FACILITY_ID]      INT              IDENTITY (1, 1) NOT NULL,
    [TIME_KEY]            INT              NOT NULL,
    [FACILITY_ID]         INT              NOT NULL,
    [AUDIT_USER]          VARCHAR (100)    NOT NULL,
    [AUDIT_DTTM]          DATETIME         NOT NULL,
    [AUDIT_DTTM_TZ]       INT              NOT NULL,
    [AUDIT_MOD_USER]      VARCHAR (100)    NOT NULL,
    [AUDIT_MOD_DTTM]      DATETIME         NOT NULL,
    [AUDIT_MOD_DTTM_TZ]   INT              NOT NULL,
    [RLS_MASK]            VARBINARY (256)  NULL,
    [RLS_OWNER]           UNIQUEIDENTIFIER NULL,
    [BUILTIN]             BIT              NOT NULL,
    [WRKFL_STATUS_ID]     INT              NOT NULL,
    [ACTIVE_FLG]          BIT              NOT NULL,
    [SORT_ORDER]          INT              NOT NULL,
    [FACILITY_NAME]       VARCHAR (100)    NOT NULL,
    [FACILITY_SNAME]      VARCHAR (50)     NOT NULL,
    [FACILITY_DESC]       VARCHAR (MAX)    NOT NULL,
    [FACILITY_TYPE]       INT              NOT NULL,
    [AXIS_UTL_MEASURE_ID] INT              NOT NULL,
    [X_AXIS]              INT              NOT NULL,
    [Y_AXIS]              INT              NOT NULL,
    [Z_AXIS]              INT              NOT NULL,
    [TIMEZONE_TYPE]       INT              NOT NULL,
    [ORG_ID]              INT              NOT NULL,
    [PARENT_ID]           INT              NULL
);

